package cn.edu.xmu.javaee.productdemovalid.controller.dto;

import cn.edu.xmu.javaee.core.validation.NewGroup;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 商品草稿
 *
 */
@NoArgsConstructor
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ProductDto {
    @NotBlank(message = "{ProductDraftVo.name.notnull}", groups = NewGroup.class)
    private String name;

    @Min(value = 0, message = "{ProductDraftVo.originalPrice.min}", groups = NewGroup.class)
    private Long originalPrice;

    private Long weight;

    private String barcode;

    private String unit;

    private String originPlace;
}
